package cn.livingCloud.repository;

import cn.livingCloud.dto.Page;
import cn.livingCloud.entity.user.AccountPrivilege;
import cn.livingCloud.entity.user.User;
import cn.livingCloud.entity.user.UserAccount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 唐旭 on 2015/12/2.
 */
@Repository
public interface UserMapper {
    UserAccount findUserAccountByUserName(String username);

    void save(User user);

    void saveAccountPrivilege(AccountPrivilege accountPrivilege);

    void saveUserAccount(UserAccount userAccount);

    UserAccount findUserAccountByUserNamePassword(@Param("username") String username
            , @Param("password") String password);

    List<User> findUserList(Page listDto);

    User findUserByUuid(String uuid);

    void update(User user);

    List<User> searchUserList(@Param("key") String key);
}
